<table width="100%" border="1" cellspacing="5" cellpadding="5" class="tbl_border">
  <tr>
    <td width="66%" bgcolor="#3399FF">&nbsp;</td>
    <td width="34%" align="center" bgcolor="#3399FF"><a href="index.php?page=add_heuristik"><img src="assets/image/add_btn.png" width="50" height="51" alt="Add" /></a></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#3399FF"><form action="index.php?page=heuristik_filter&amp;&amp;pencarian" method="post" name="form1" id="form1">
      Filter by Code
      <input type="text" name="search" id="search" />
      <input type="submit" name="button" id="button" value="Search" />
    </form></td>
    <td align="center" bgcolor="#3399FF"><form action="index.php?page=heuristik_filter&amp;&amp;pencarian2" method="post" name="form1" id="form1">
      Filter by Date
          <input type="text" name="search2" id="search2" />
      <input type="submit" name="button2" id="button2" value="Search" />
      <br />
    Format :YYYY-MM-DD
    </form></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
	<table width="100%" border="1" cellspacing="0" cellpadding="0" class="tbl_border">
      <tr>
        <td width="5%" align="center" bgcolor="#333333" class="judul">#</td>
        <td width="25%%" align="center" bgcolor="#333333"><a href="index.php?page=heuristik_filter&&sharingan=code&&opsi=asc">Code</a></td>
        <td width="30%" align="center" bgcolor="#333333"><a href="index.php?page=heuristik_filter&&sharingan=detail&&opsi=asc">Detail</a></td>
        <td width="10%" align="center" bgcolor="#333333"><a href="index.php?page=heuristik_filter&&sharingan=status&&opsi=asc">Status</a></td>
		<td width="20%" align="center" bgcolor="#333333">Date</td>
        <td width="10%" align="center" bgcolor="#333333" class="judul">Config</td>
      </tr><?php
$kueri = mysql_query("select * from tbl_heuristik ORDER BY code ASC");
$kueri_row = mysql_num_rows($kueri);
//echo $kueri_row;
if($kueri_row == 0){
?>
	<tr>
        <td>-</td>
		<td>-</td>
        <td>-</td>
        <td>-</td>
        <td>-</td>
        <td>-</td>
      </tr>
<?php
}else{
	$no=0;
	$setrip = "&nbsp;-&nbsp;";
	while($data = mysql_fetch_array($kueri))
	{
		$no++;
		if($no%2){
			$pelangi = "class=\"ganjil\"";	
		}else{
			$pelangi = "class=\"genap\"";	
		}
	?>
		<tr <?=$pelangi;?>>
		  <td align="center"><?=$no;?></td>
		  <td width="16%" class="judul" align="center"><font color="#FFFFFF">
		    <textarea name="textarea" cols="30" rows="5" readonly="readonly"><?=$data['code'];?></textarea>
	      </font></td>
		  <td class="judul" align="center"><font color="#FFFFFF">
		    <textarea name="textarea2" cols="30" rows="5" readonly="readonly"><?=$data['detail'];?>
		    </textarea></font></td>
		  <td align="center">
		  <?php
		  if($data['status'] == "banned"){
			echo "<font color=#FF0000>Banned</font>";  
		  }elseif($data['status'] == "unbanned"){
			echo "<font color=#003300>Unbanned</font>";
		  }else{
			echo"ERROR";  
		  }	
		  ?>
		  </td>
		  <td class="judul" align="center"><font color="#FFFFFF"><?=$data['date'];?></font></td>
		  <td align="center"><a href="index.php?page=edit_heuristik&&id=<?=$data['id_heuristik'];?>">Edit</a><br /></td>
		</tr>
		<?php
	}
}
	?>
    </table></td>
  </tr>
</table>